package com.xcdh.trading.controller;

import com.xcdh.commons.controller.BaseController;
import com.xcdh.commons.query.QueryPayload;
import com.xcdh.domain.vo.PageVO;
import com.xcdh.domain.vo.R;
import com.xcdh.trading.entity.DayTransactionData;
import com.xcdh.trading.entity.HotMoneyTrc;
import com.xcdh.trading.service.DayTransactionDataService;
import com.xcdh.trading.service.HotMoneyTrcService;
import com.xcdh.trading.service.StockInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

@RestController
@RequestMapping("/hotMoneyTrc")
public class HotMoneyTrcController extends BaseController<HotMoneyTrc, HotMoneyTrcService> {

    @Autowired
    private HotMoneyTrcService hotMoneyTrcService ;
    @Autowired
    private StockInfoService stockInfoService ;

    @Autowired
    private DayTransactionDataService dayTransactionDataService;
    @PostMapping("/syncHotMoneyTrc/{dateCode}")
    public R syncHotMoneyTrc(@PathVariable String dateCode){
        hotMoneyTrcService.syncHotMoneyTrc(dateCode);
        return R.ok() ;
    }

    @PostMapping("/updateHotMoneyTrc/{dateCode}")
    public R updateHotMoneyTrc(@PathVariable String dateCode){
        hotMoneyTrcService.updateHotMoneyTrc(dateCode);
        return R.ok() ;
    }


}
